how to solve fermat's little theorem the easy way